import { ref, provide, inject } from "vue";
const bus = ref({})
const provideBus = () => {
  provide('bus', bus)
}
const injectBus = () => {
  const bus = inject('bus')
  if (!bus) console.error('没有提供事件');
  return bus
}
export { provideBus, injectBus }